/**
 *
 */
package net.haroeris.wh40kcampaign.beans.po;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Ein Spieler kann mehrere Armeen haben. Jede Armee gehoert aber zu nur
 * einem Spieler.
 *
 * @author user
 *
 */
@Entity
@Table(name=Army.TABLE_NAME)
public class Army {
    public static final String TABLE_NAME="Army";

    @Id
    private Long id;

    @ManyToOne(targetEntity=Player.class)
    private Player player;

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the player
     */
    public Player getPlayer() {
        return player;
    }

    /**
     * @param player the player to set
     */
    public void setPlayer(Player player) {
        this.player = player;
    }
}
